from typing import Optional
from pydantic import BaseModel
from datetime import datetime

# hazard新增schema
class Hazard_Create_Schema(BaseModel):
    hazardcategory: str
    hazarddesc: str
    hazardtype: str
    hazardbasis: str
    remark: Optional[str]
    create_by: Optional[str]
    create_time: Optional[datetime]

# hazard更新schema
class Hazard_Update_Schema(BaseModel):
    hazard_id: str
    hazardcategory: Optional[str]
    hazarddesc: Optional[str]
    hazardtype: Optional[str]
    hazardbasis: Optional[str]
    remark: Optional[str]
    create_by: Optional[str]
    create_time: Optional[datetime]
    update_by: Optional[str]
    update_time: Optional[datetime]
    
    
# hazard查询schema
class Hazard_Query_Schema(BaseModel):
    hazard_id: Optional[str]
    hazardcategory: Optional[str]
    hazarddesc: Optional[str]
    hazardtype: Optional[str]
    hazardbasis: Optional[str]
    remark: Optional[str]
    create_by: Optional[str]
    create_time: Optional[datetime]
    update_time: Optional[datetime]
    update_by: Optional[str]
